package com.literature.threeGroup.service.imp;

import com.literature.threeGroup.mapper.OrderMapper;
import com.literature.threeGroup.pojo.Order;
import com.literature.threeGroup.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImp implements OrderService {

    @Autowired
    private OrderMapper orderMapper;


    @Override
    public List<Order> FindAll(String format) {
        return orderMapper.findAll(format);
    }

    @Override
    public void updateOrder(String review,String id) {
        orderMapper.updateOrder(review,id);
    }

    @Override
    public void updateState(String state,String id) {
        //修改
         orderMapper.updateState(state,id);
    }

    @Override
    public List<Order> auditList() {
        return orderMapper.auditList();
    }

    @Override
    public Order selectById(String id) {
        return orderMapper.selectByPrimaryKey(id);
    }

    @Override
    public void insertOrder(Order order) {
        orderMapper.insert(order);
    }

    @Override
    public List<Order> selectYear() {
        return orderMapper.selectYear();
    }

    @Override
    public List<Order> xtdingAll(String year,String type) {
        return orderMapper.xtdingAll(year,type);
    }

    @Override
    public List<Order> getTypes() {
        return orderMapper.getTypes();
    }

    @Override
    public void updateDiscontinueData(String format,String id) {
        //设置停订时间
        orderMapper.updateDiscontinueData(format,id);
    }

    @Override
    public List<Order> getDiscontinue() {
        return orderMapper.getDiscontinue();
    }

    @Override
    public List<Order> getNotArrivedForThreeYears(int i) {
        return orderMapper.getNotArrivedForThreeYears(i);
    }

}
